<form name="frmMock" class="form-horizontal" ng-init="dvm.init()" ng-submit="dvm.submit(frmMock.$valid)" novalidate>
  <div class="modal-header">
    <button type="button" class="close" ng-click="dvm.cancel()">&times;</button>
    <h4 class="modal-title">导入MOCK数据</h4>
  </div>
  <div class="modal-body">
    <div class="form-group">
      <label class="col-sm-3 col-md-2 control-label">上级路径：</label>
      <div class="col-sm-9 col-md-10">
        <input name="parent" type="text" class="form-control" value="{{dvm.parent}}" readonly>
      </div>
    </div>
    <div class="form-group" ng-if="dvm.type == 'doc'">
      <label class="col-sm-3 col-md-2 control-label">文件：</label>
      <div class="col-sm-9 col-md-10">
        <input type="file" ngf-select="dvm.upload($file)" ngf-max-size="'2MB'" ngf-accept="'.xml,.json'">
      </div>
    </div>
    <div class="form-group" ng-if="dvm.type == 'zip'">
      <label class="col-sm-3 col-md-2 control-label">压缩包：</label>
      <div class="col-sm-9 col-md-10">
        <input type="file" ngf-select="dvm.upload($file)" ngf-max-size="'20MB'" ngf-accept="'.zip'">
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-9 col-md-10 col-sm-offset-3 col-md-offset-2">
        <div class="checkbox">
          <label>
            <input type="checkbox" ng-model="dvm.overwrite"> 覆盖同名文件夹或文件
          </label>
        </div>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="submit" class="btn btn-default" ng-disabled="frmMock.$invalid || !dvm.file">
      <i class="fa fa-check"></i> 导入</button>
    <button type="button" class="btn btn-default" ng-click="dvm.cancel()">
      <i class="fa fa-times"></i> 取消</button>
  </div>
</form>
